#ifndef __ICLIENT__
#define __ICLIENT__

#include "IObject.h"
#include "IPacket.h"


#define CREATE_CLIENT(ptrClient)\
  ptrClient = Invoke<IClient>("CDataCenterClient", nullptr, nullptr, 0);\

class IClient: public virtual IObject
{
public:
	virtual const bool InitClient(const PST_StartServerSidePara ptrStartServerSidePara) = 0;
	virtual const bool DataConnectEd() = 0;
	virtual const bool CreateDataConnect(PST_StartServerSidePara ptrStartServerSidePara) = 0;
    virtual const bool DisableDataConnect() = 0;
    virtual const void SendHeartbeat() = 0;
    virtual const bool InitKcbpConnectInfo(PST_KCBP_CONNECT_INFO ptrKcbpConnectInfo) = 0;
    virtual const bool SendASynReqTask(const char * pszConnectId, IData * ptrTask) = 0;
    virtual const bool SendASynReqTask(const char * pszConnectId, const char * pszTask) = 0;
    virtual const bool SendSyncReqTask(const char * pszConnectId, IData * ptrTask, IData ** ptrRetVal, int iTimeOut) = 0;
    virtual const bool SendSyncReqTask(const char * pszConnectId, const char * pszTask, char ** pszRetVal, int & iLen, int iTimeOut) = 0;
	virtual const bool KcbpRunAsynTask(const char * pszTask, const char * pszIpAdd = nullptr) = 0;
	virtual const bool KcbpRunAsynTask(IPacket * ptrTask, const char * pszIpAdd = nullptr) = 0;
	virtual const bool KcbpRunSyncTask(const char * pszTask, char ** pszRetVal, int & refiSize, int iTimeOut, const char * pszIpAdd) = 0;
	virtual const bool KcbpRunSyncTask(IPacket * ptrTask, IPacket ** ptrRetVal, int iTimeOut, const char * pszIpAdd) = 0;
	virtual const bool MaRunAsynTask(const char * pszTask, const char * pszIpAdd) = 0;
	virtual const bool MaRunAsynTask(IPacket * ptrTask, const char * pszIpAdd) = 0;
	virtual const bool MaRunSyncTask(const char * pszTask, char ** pszRetVal, unsigned long & refiSize, int iTimeOut, const char * pszIpAdd) = 0;
	virtual const bool MaRunSyncTask(IPacket * ptrTask, IPacket ** ptrRetVal, int iTimeOut, const char * pszIpAdd) = 0;
	virtual const bool MaRunSubTask(const char * pszTask, char ** pszRetVal, unsigned long & refiSize, int iTimeOut, const char * pszIpAdd) = 0;
	virtual const bool MaRunSubTask(IPacket * ptrTask, IPacket ** ptrRetVal, int iTimeOut, const char * pszIpAdd) = 0;
	virtual const bool MaRunUnSubTask(const char * pszTask, char ** pszRetVal, unsigned long & refiSize, int iTimeOut) = 0;
	virtual const bool MaRunUnSubTask(IPacket * ptrTask, IPacket ** ptrRetVal, int iTimeOut) = 0;

	virtual const unsigned long long GetLastRunTime() = 0;
	virtual const void SetLastRunTime(unsigned long long ullValue) = 0;
	virtual const int DsOutTime() = 0;
	virtual const char * MntLbmNo() = 0;
	virtual void SetDsOutTime(const int iDsOutTime) = 0;
	virtual void SetMntLbmNo(const char * pszMntLbmNo) = 0;
	virtual void DeleteMntLbm(const long long llSeqNo) = 0;
	virtual const bool CheckDataCentre() = 0;
	//virtual const unsigned long GetDCProcessId() = 0;
	//virtual void SetDCProcessId(const unsigned long ulProcessId) = 0;
};



#endif//__ICLIENT__